isEmpty(QMAKE_LRELEASE) {
	QMAKE_LRELEASE = lrelease
}

TEMPLATE = app
TARGET = localized-app
DEPENDPATH += .
INCLUDEPATH += .
CONFIG += link_pkgconfig meegotouch
PKGCONFIG += meegotouchcore
OTHER_FILES += localized-app.qml

QT += declarative

# Input
HEADERS +=
SOURCES += main.cpp
TRANSLATIONS += translations/localizedapp_en.ts translations/localizedapp_ru.ts
RESOURCES += localized-qml-rsc.qrc

updateqm.input = TRANSLATIONS
updateqm.output = .qm/locale/${QMAKE_FILE_BASE}.qm
updateqm.commands = $$QMAKE_LRELEASE ${QMAKE_FILE_IN} -qm .qm/locale/${QMAKE_FILE_BASE}.qm
updateqm.CONFIG += no_link target_predeps
QMAKE_EXTRA_COMPILERS += updateqm

PRE_TARGETDEPS += compiler_updateqm_make_all

  unix {
    #VARIABLES
    isEmpty(PREFIX) {
        PREFIX = /usr
  }

BINDIR = $$PREFIX/bin
DATADIR =$$PREFIX/share
TRANSLATION_INSTALLDIR = /usr/share/l10n/meegotouch/

DEFINES += DATADIR=\\\"$$DATADIR\\\" PKGDATADIR=\\\"$$PKGDATADIR\\\"

#MAKE INSTALL

INSTALLS += target qmfiles desktop service icon26 icon48 icon64
    target.path = $$BINDIR

    qmfiles.CONFIG += no_check_exist
    qmfiles.path = $${TRANSLATION_INSTALLDIR}
    qmfiles.files = .qm/locale/localizedapp_*.qm

    desktop.path = $$DATADIR/applications
    desktop.files += $${TARGET}.desktop

    service.path = $$DATADIR/dbus-1/services/
    service.files += com.nokia.$${TARGET}.service

    icon26.path = $$DATADIR/icons/hicolor/26x26/apps
    icon26.files += ../data/26x26/$${TARGET}.png

    icon48.path = $$DATADIR/icons/hicolor/48x48/apps
    icon48.files += ../data/48x48/$${TARGET}.png

    icon64.path = $$DATADIR/icons/hicolor/64x64/apps
    icon64.files += ../data/64x64/$${TARGET}.png

}

